package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DoseValueMonitorMapper;
import com.ruoyi.system.domain.DoseValueMonitor;
import com.ruoyi.system.service.IDoseValueMonitorService;
import com.ruoyi.common.core.text.Convert;

/**
 * 剂量监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-29
 */
@Service
public class DoseValueMonitorServiceImpl implements IDoseValueMonitorService 
{
    @Autowired
    private DoseValueMonitorMapper doseValueMonitorMapper;

    /**
     * 查询剂量监控
     * 
     * @param id 剂量监控主键
     * @return 剂量监控
     */
    @Override
    public DoseValueMonitor selectDoseValueMonitorById(Long id)
    {
        return doseValueMonitorMapper.selectDoseValueMonitorById(id);
    }

    /**
     * 查询剂量监控列表
     * 
     * @param doseValueMonitor 剂量监控
     * @return 剂量监控
     */
    @Override
    public List<DoseValueMonitor> selectDoseValueMonitorList(DoseValueMonitor doseValueMonitor)
    {
        return doseValueMonitorMapper.selectDoseValueMonitorList(doseValueMonitor);
    }

    @Override
    public List<DoseValueMonitor> getDoing(DoseValueMonitor dv) {
        return doseValueMonitorMapper.selectDoseValueMonitorList(dv);
    }

    /**
     * 新增剂量监控
     * 
     * @param doseValueMonitor 剂量监控
     * @return 结果
     */
    @Override
    public int insertDoseValueMonitor(DoseValueMonitor doseValueMonitor)
    {
        return doseValueMonitorMapper.insertDoseValueMonitor(doseValueMonitor);
    }

    /**
     * 修改剂量监控
     * 
     * @param doseValueMonitor 剂量监控
     * @return 结果
     */
    @Override
    public int updateDoseValueMonitor(DoseValueMonitor doseValueMonitor)
    {
        return doseValueMonitorMapper.updateDoseValueMonitor(doseValueMonitor);
    }

    /**
     * 批量删除剂量监控
     * 
     * @param ids 需要删除的剂量监控主键
     * @return 结果
     */
    @Override
    public int deleteDoseValueMonitorByIds(String ids)
    {
        return doseValueMonitorMapper.deleteDoseValueMonitorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除剂量监控信息
     * 
     * @param id 剂量监控主键
     * @return 结果
     */
    @Override
    public int deleteDoseValueMonitorById(Long id)
    {
        return doseValueMonitorMapper.deleteDoseValueMonitorById(id);
    }

    @Override
    public List<DoseValueMonitor> getByOverhaul(Integer pageNumber, Integer lines, String overhaul_name) {
        return doseValueMonitorMapper.getByOverhaul(pageNumber,lines,overhaul_name);
    }
}
